package com.gaohe.hotal.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.hotal.mapper.HotWayMapper;
import com.gaohe.hotal.domain.HotWay;
import com.gaohe.hotal.service.IHotWayService;

/**
 * 价格方案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class HotWayServiceImpl implements IHotWayService 
{
    @Autowired
    private HotWayMapper hotWayMapper;

    /**
     * 查询价格方案
     * 
     * @param wayId 价格方案主键
     * @return 价格方案
     */
    @Override
    public HotWay selectHotWayByWayId(Long wayId)
    {
        return hotWayMapper.selectHotWayByWayId(wayId);
    }

    /**
     * 查询价格方案列表
     * 
     * @param hotWay 价格方案
     * @return 价格方案
     */
    @Override
    public List<HotWay> selectHotWayList(HotWay hotWay)
    {
        return hotWayMapper.selectHotWayList(hotWay);
    }

    /**
     * 新增价格方案
     * 
     * @param hotWay 价格方案
     * @return 结果
     */
    @Override
    public int insertHotWay(HotWay hotWay)
    {
        hotWay.setCreateTime(DateUtils.getNowDate());
        return hotWayMapper.insertHotWay(hotWay);
    }

    /**
     * 修改价格方案
     * 
     * @param hotWay 价格方案
     * @return 结果
     */
    @Override
    public int updateHotWay(HotWay hotWay)
    {
        hotWay.setUpdateTime(DateUtils.getNowDate());
        return hotWayMapper.updateHotWay(hotWay);
    }

    /**
     * 批量删除价格方案
     * 
     * @param wayIds 需要删除的价格方案主键
     * @return 结果
     */
    @Override
    public int deleteHotWayByWayIds(Long[] wayIds)
    {
        return hotWayMapper.deleteHotWayByWayIds(wayIds);
    }

    /**
     * 删除价格方案信息
     * 
     * @param wayId 价格方案主键
     * @return 结果
     */
    @Override
    public int deleteHotWayByWayId(Long wayId)
    {
        return hotWayMapper.deleteHotWayByWayId(wayId);
    }
}
